<template>
  <el-dialog
    title='register-success'
    size="large"
    class="login-form "
    width="440px"
    :close-on-click-modal="false"
    :destroy-on-close="true"
    :lock-scroll="false"
    :visible="visible"
    :before-close="handleClose">
    <div class="second_block">
      <br>
      <div style="font-size: 20px;text-align: center;color: white;">{{script_1}}</div>
      <br><br>
      <div  v-if="form.display_comment_link_view==1 && email_show==1 && form.gift_info.length >0">
        <div style="font-size: 20px;text-align: center;color: white;">{{script_2}}</div>
        <br><br>
        <div style="text-align: center">
          <el-button type="warning" @click="doOff">No</el-button>
          &nbsp;&nbsp;
          <el-button type="primary" @click="doGiftSelection">Next</el-button>
        </div>
      </div>

    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "register-success",
  props: {
    // 弹窗是否打开
    visible: Boolean,
    // 修改回显的数据
    data: Object
  },
  data() {
    return {
      // 表单数据
      form: Object.assign({}, this.data),
      // 表单验证规则
      rules: {
      },
      // 提交状态
      loading: false,
      // 是否是修改
      isUpdate: false,
      script_1:'',
      script_2:'',
      email_show:''
    };
  },
  methods : {
    handleClose(done) {
      done();
      this.$emit('handleClose');
    },
    setBuyerConfig(data){
      this.script_1 = data.register_success_page_script.script_1;
      this.script_2 = data.register_success_page_script.script_2;
      this.email_show = data.email_show;
    },
    setForm(form)
    {
      this.form = form;
    },
    //关闭
    doOff()
    {
      this.$emit('handleClose');
    },
    //跳转礼品页
    doGiftSelection()
    {
      this.$emit('getRegister','');
    },
  }
}
</script>

<style scoped>

</style>
